package com.reef.dao;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.reef.entity.Detailed;

public interface DetailedRepository extends JpaRepository<Detailed, Integer>,JpaSpecificationExecutor<Detailed>{
	/**
	 * 根据id修改离开时间
	 */
	@Transactional
	@Modifying
	@Query(value = "update detailed set leavetime=?1 where did =?2",nativeQuery = true)
	int updateTime(String endtime,int did);

	
}
